#! /usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'abcdefg'
__time__ = '22/06/18 下午9:39'


class sms3(object):
    """模拟第三方假装发信"""

    @staticmethod
    def send_template_sms(to, code_data, timeout):
        try:
            print("准备发短信的手机号:{}".format(to))
            print("模拟发送:你的验证码是[{}],!验证码[{}]秒后过期,派神科技!".format(code_data, timeout))
            return 0
        except Exception as err:
            print(err)
            return -1


if __name__ == '__main__':
    sms3.send_template_sms("18812345678", "123456", int(300/5*2))
